from database_connection.index import Base, engine
from sqlalchemy import Column, Integer, ForeignKey


class Admin_Link_Blog(Base):  # 必须继承declaraive_base得到的那个基类
    __tablename__ = "Admin_Link_Blog"
    id = Column(Integer, nullable=False, primary_key=True, autoincrement=True, unique=True, comment="id")
    blog_id = Column(Integer, ForeignKey('Blog.id'), nullable=False)
    admin_id = Column(Integer, ForeignKey('Admin.id'), nullable=False)


Base.metadata.create_all(engine)
